import request from "@/apis/request";


export const findColors = async (searchForm, currentPage, pageSize) => {
    return await request.get('/api/color/find',
        {
            params: {
                colorCode: searchForm.colorCode,
                color: searchForm.color,
                remarks: searchForm.remarks,
                currentPage: currentPage,
                pageSize: pageSize
            }
        })
}
export const addColor = async (form) => {
    console.log(form)
    return await request.post('/api/color/insert', form)
}

export const updateColor = async (form) => {
    return await request.put('/api/color/update', form)
}
export const deleteColor = async (id) => {
    return await request.delete('/api/color/delete', {data: id})
}